package com.example.demo.core.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;

/**
 * @author yujie
 * @date 2021-05-27 22:33
 */
public class StringUtil {
    private Logger logger = LoggerFactory.getLogger(StringUtil.class);

    public static String replaceMapParam(String data, Map<String, Object> paramMap) {
        for (Map.Entry<String, Object> entry : paramMap.entrySet()) {
            if (data.contains(entry.getKey())) {
                data.replaceAll(entry.getKey(), entry.getValue().toString());
            }
        }
        return data;
    }



}
